package pojo;

import java.util.Collection;
import java.util.Objects;

public class TbRole {
    private Integer roleId;
    private String roleName;
    private Collection<TbPmsRole> tbPmsRolesByRoleId;
    private Collection<TbUserRole> tbUserRolesByRoleId;

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TbRole tbRole = (TbRole) o;
        return Objects.equals(roleId, tbRole.roleId) &&
                Objects.equals(roleName, tbRole.roleName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(roleId, roleName);
    }

    public Collection<TbPmsRole> getTbPmsRolesByRoleId() {
        return tbPmsRolesByRoleId;
    }

    public void setTbPmsRolesByRoleId(Collection<TbPmsRole> tbPmsRolesByRoleId) {
        this.tbPmsRolesByRoleId = tbPmsRolesByRoleId;
    }

    public Collection<TbUserRole> getTbUserRolesByRoleId() {
        return tbUserRolesByRoleId;
    }

    public void setTbUserRolesByRoleId(Collection<TbUserRole> tbUserRolesByRoleId) {
        this.tbUserRolesByRoleId = tbUserRolesByRoleId;
    }
}
